package cnn.user.entity;

import cnn.topfox.annotation.Table;
import cnn.topfox.common.DataQTO;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@Table(name = "SecUser")
public class UserQTO extends DataQTO {
    /**
     * Eq:等   Ne:不等
     * 任何字段名后缀说明(假如该字段的值是 value1,value2)
     * fieldOrEq      则生成SQL: (field = valus1 OR field = value2)
     * fieldAndNe     则生成SQL: (field <> valus1 AND field = value2)
     * fieldOrLike    则生成SQL: (field LIKE CONCAT("%",valus1,"%") OR field LIKE CONCAT("%",valus2,"%"))
     * fieldAndNotLike 则生成SQL: (field NOT LIKE CONCAT("%",valus1,"%") AND field NOT LIKE CONCAT("%",valus2,"%"))
     */

    /**
     *  与之对应的mybatis 的 mapper.xml文件配置如下
         <where>
         <if test = "idOrEq != null">AND ${idOrEq}</if>
         <if test = "idAndNe != null">AND ${idAndNe}</if>
         <if test = "idOrLike != null">AND ${idOrLike}</if>
         <if test = "idAndNotLike != null">AND ${idAndNotLike}</if>
         </where>
     */

    private String id;            //用户id, 与数据字段名一样的
    private String idOrEq;
    private String idAndNe;
    private String idOrLike;
    private String idAndNotLike;
    private String age;           //年龄age,与数据字段名一样的

    private String name;          //用户姓名name, 与数据字段名一样的
    private String nameOrEq;      //用户姓名 后缀OrEq
    private String nameAndNe;     //用户姓名 后缀AndNe
    private String nameOrLike;    //用户姓名 后缀OrLike
    private String nameAndNotLike;//用户姓名 后缀AndNotLike

    //数据库原始字段为 lastDate
    private Date lastDateFrom;    //最后登录日期  开始
    private Date lastDateTo;      //最后登录日期  结束

    private String userId;//登陆专用, 用户账号,  即: Id 手机号 编号
    private String code;
    private String orgId;


    private String password;
    private String sex;
    private String logo;
    private String mobile;


    private Integer loginCountFrom;
    private Integer loginCountTo;

}